package com.example.mtb;

import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.excel.EasyExcel;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author: zouren
 * @date: 2022/7/28
 * @description:
 */
public class Test {
    public static void main(String[] args) {
        System.out.println( DesensitizedUtil.mobilePhone("18049531999"));
        System.out.println( DesensitizedUtil.mobilePhone(null));
        System.out.println( DesensitizedUtil.mobilePhone("12"));
        System.out.println( DesensitizedUtil.mobilePhone("123"));
        System.out.println( DesensitizedUtil.mobilePhone("1234"));
        System.out.println( DesensitizedUtil.mobilePhone("12345"));
        System.out.println( DesensitizedUtil.mobilePhone("123456"));
        System.out.println( DesensitizedUtil.mobilePhone("1234567"));
        System.out.println( DesensitizedUtil.mobilePhone("12345679"));
        System.out.println( DesensitizedUtil.mobilePhone("123456790"));
//        String path="D:\\log/2.xlsx";
//        String path_new="D:\\log/2-1.xlsx";
//        DesensitizedUtil.mobilePhone("18049531999");
//        System.out.println( DesensitizedUtil.mobilePhone("18049531999"));
//        System.out.println( DesensitizedUtil.mobilePhone("1"));
//        List<DateE> list = EasyExcel.read(getInputStream(path), DateE.class,new DataExListener()).sheet(0).doReadSync();
//        System.out.println(list.size());
//
//        EasyExcel.write(path_new, DateE.class).sheet(0).doWrite(list);
    }
    private static InputStream getInputStream(String fileName) {
        try {
            return new FileInputStream(new File(fileName));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        return null;
    }
}
